package com.lyz.moil.common;

public enum CommandEnum {

    LOGIN("/account/user/login", "用户登陆"),

    REG_DEVICE("/common/device/reg", "设备向服务器注册"),

    AUTH_DEVICE("/common/device/auth", "设备向服务器认证"),

    UPLOAD_INFO_FROM_DEVICE("/common/device/uploadInfo", "服务器获取设备信息"),

    LOGOUT("/account/user/logout", "用户退出系统"),

    PUT_INFO("/common/device/putInfo", "设备上传信息"),

    CONTACT_RESTORE("/contact/contactRestore", "还原联系人"),

    CONTACT("/contact/contact", "操作联系人"),

    UPLOAD_INFO("/common/device/uploadInfo", "上传设备信息"),

    UPLOAD_LOCATION("/common/device/uploadLocation", "上传设备位置"),

    LOCK_SCREEN("/common/device/lockScreen", "远程锁屏(设置密码)"),
    LOCK_NETWORK("/common/device/lockNetwork", "控制网络"),

    CLEA_RDATA("/common/device/clearData", "清除设备数据"),   //wipe-all-sdcards wipe-data , sms,callLog,contact,license-expired

    SEND_TEXT("/msg/msg/sendText", "发送文本消息"),

    LIST_ALL_USER("/account/user/listAll", "查询在线用户"),

    UPDATE_USER_PASS("/account/user/updatePassword", "用户修改密码"),

    SYSTEM_COMM_TO("/systemCommTo", "系统命令"),

    SYNC_NOTIFI("/sync/notifi", "同步通知"),

    SYNC_PUSH("/sync/push", "消息推送"),

    CONTACT_GROUP("/contact/contact_group", "联系人分组操作"),

    UPDATE_USER("/account/user/updateInfo", "修改个人账户信息"),

    STATUS_NOTIFI("/status/notifi", "状态通知"),

    /**
     * U邦 *
     */
    UBUN_KEY_VERIFY("/ubun/license/verify", "密钥验证"),
    UBUN_LOGIN("/ubun/customer/login", "客户注册");

    private CommandEnum(String path, String name) {
        this.path = path;
        this.name = name;
    }

    public static String getLikePath(String spath) {
        String dpath = "";
        for (CommandEnum command : CommandEnum.values()) {
            if (spath.contains(command.getPath())) {
                dpath = command.getPath();
            }
        }
        return dpath;
    }

    private String path;
    private String name;

    public String getPath() {
        return path;
    }

    public boolean isPath(String path) {
        return this.path.equals(path);
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
